<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    h1 {
      color: transparent;
      font-size: 60px;
      text-align: center;
      background-image: url(./1.jpg);
      background-clip: text;
    }
  </style>
</head>

<body>
  <h1>文字背景</h1>
</body>

</html>